--[[

	Shader Code
	
--]]

ballEffect = ([[

		extern vec2 ball;
		extern float size;
		extern vec4 col;

		float metaball(vec2 x)
		{
			x /= 1.0 * size;
			return 1.0 / (dot(x, x) + .00001);
		}

		vec4 effect(vec4 color, Image tex, vec2 tc, vec2 pc)
		{
			float p = 0.0;
			p += metaball(pc - ball);
			return vec4(col[0]*p, col[1]*p, col[2]*p, col[3]*p);
		}
		
	]])
	
--[[

	Gets
	
--]]
--Returns the ball effect
function getBallEffect()
	return ballEffect
end